var leftMenu = $("#leftMenu");
var currentIndex = sessionStorage.getItem("index") == null? 0 : sessionStorage.getItem("index");
leftMenu.children(".panel:not(:eq("+currentIndex+"))").children(".list-group").hide();
leftMenu.children(".panel").each(function(index, item) {
	let menuItem = $(item);
	menuItem.children(".panel-heading").click(function(){
		if(menuItem.children(".list-group").is(":hidden")){
			leftMenu.children(".panel:eq("+currentIndex+")").children(".list-group").slideUp();
			menuItem.children(".list-group").slideDown();
			currentIndex=index;
			sessionStorage.setItem("index",currentIndex);
		}
	});
	

});